{template 'header', 'member'}
<script type="text/javascript">c(3);</script>
<div class="menu">
<table cellpadding="0" cellspacing="0">
<tr>
<td class="tab" id="Tab0"><a href="javascript:Tab(0);"><span>Common settings</span></a></td>
<td class="tab_nav">&nbsp;</td>
<td class="tab" id="Tab1"><a href="javascript:Tab(1);"><span>Navigation menu</span></a></td>
<td class="tab_nav">&nbsp;</td>
<td class="tab" id="Tab2"><a href="javascript:Tab(2);"><span>Sidebar</span></a></td>
<td class="tab_nav">&nbsp;</td>
<td class="tab" id="Tab3"><a href="javascript:Tab(3);"><span>Home Set</span></a></td>
<td class="tab_nav">&nbsp;</td>
<td class="tab" id="Tab4"><a href="javascript:Tab(4);"><span>Other settings</span></a></td>
<td class="tab_nav">&nbsp;</td>
</tr>
</table>
</div>
<form method="post" action="home.php" id="dform">
<input type="hidden" name="tab" id="tab" value="{$tab}"/>
<div id="Tabs0" style="display:;">
<table cellspacing="1" cellpadding="6" class="tb">
<tr>
<td class="tl">Customize the background color</td>
<td class="tr f_gray"><input name="setting[bgcolor]" type="text" size="10" id="bgcolor" value="{$bgcolor}"/>&nbsp; For example, red for red Or #FF0000</td>
</tr>
<tr>
<td class="tl">Custom background image</td>
<td class="tr"><input name="setting[background]" type="text" size="60" id="background" value="{$background}" readonly/>&nbsp;&nbsp;<span onclick="Dthumb({$moduleid},0,0, Dd('background').value, true, 'background');" class="jt">[Upload]</span>&nbsp;&nbsp;<span onclick="_preview(Dd('background').value);" class="jt">[Preview]</span>&nbsp;&nbsp;<span onclick="Dd('background').value='';" class="jt">[Delete]</span></td>
</tr>
<tr>
<td class="tl">CustomLOGO</td>
<td class="tr"><input name="setting[logo]" type="text" size="60" id="logo" value="{$logo}" readonly/>&nbsp;&nbsp;<span onclick="Dthumb({$moduleid},0,0, Dd('logo').value, true, 'logo');" class="jt">[Upload]</span>&nbsp;&nbsp;<span onclick="_preview(Dd('logo').value);" class="jt">[Preview]</span>&nbsp;&nbsp;<span onclick="Dd('logo').value='';" class="jt">[Delete]</span></td>
</tr>
<tr>
<td class="tl">CustomCSS</td>
<td class="tr"><textarea name="setting[css]" id="css" style="width:500px;height:60px;overflow:visible;font-family:Fixedsys">{$css}</textarea></td>
</tr>
<tr>
<td class="tl">Banner width</td>
<td class="tr">
<input type="text" size="5" name="setting[bannerw]" value="{$bannerw}" id="bannerw"/> px
&nbsp;&nbsp;&nbsp;&nbsp;Height
<input type="text" size="5" name="setting[bannerh]" value="{$bannerh}" id="bannerh"/> px
</td>
</tr>
<tr>
<td class="tl">Banner Display</td>
<td class="tr">
<input name="setting[bannert]" type="radio" id="bannert_0" value="0"{if $bannert==0} checked{/if} onclick="Ds('bt_0');Dh('bt_1');Dh('bt_2');"/> <label for="bannert_0">Picture</label>&nbsp;&nbsp;
<input name="setting[bannert]" type="radio" id="bannert_1" value="1"{if $bannert==1} checked{/if} onclick="Dh('bt_0');Ds('bt_1');Dh('bt_2');"/> <label for="bannert_1">Flash</label>&nbsp;&nbsp;
<input name="setting[bannert]" type="radio" id="bannert_2" value="2"{if $bannert==2} checked{/if} onclick="Dh('bt_0');Dh('bt_1');Ds('bt_2');"/> <label for="bannert_2">Slideshow</label>&nbsp;&nbsp;
</td>
</tr>
<tr id="bt_0" style="display:{if $bannert!=0}none{/if};">
<td class="tl">Banners Flash address</td>
<td class="tr"><input name="setting[banner]" type="text" size="60" id="banner" value="{$banner}" readonly/>&nbsp;&nbsp;<span onclick="Dthumb({$moduleid},0,0, Dd('banner').value, true, 'banner');" class="jt">[Upload]</span>&nbsp;&nbsp;<span onclick="_preview(Dd('banner').value);" class="jt">[Preview]</span>&nbsp;&nbsp;<span onclick="Dd('banner').value='';" class="jt">[Delete]</span></td>
</tr>
<tr id="bt_1" style="display:{if $bannert!=1}none{/if};">
<td class="tl">Banners Flash address</td>
<td class="tr"><input name="setting[bannerf]" type="text" size="60" id="bannerf" value="{$bannerf}" readonly/>&nbsp;&nbsp;<span onclick="Dfile({$moduleid}, Dd('bannerf').value, 'bannerf', 'swf');" class="jt">[Upload]</span>&nbsp;&nbsp;<span onclick="if(Dd('bannerf').value) window.open(Dd('bannerf').value);" class="jt">[Preview]</span>&nbsp;&nbsp;<span onclick="Dd('bannerf').value='';" class="jt">[Delete]</span> <span id="dflash" class="f_red"></span></td>
</tr>
<tbody id="bt_2" style="display:{if $bannert!=2}none{/if};">
<tr>
<td class="tl f_red">System prompts</td>
<td class="tr f_gray">&nbsp;Only supports jpg format pictures, and upload at least two</td>
</tr>
<tr>
<td class="tl">Banner Image URL1</td>
<td class="tr"><input name="setting[banner1]" type="text" size="60" id="banner1" value="{$banner1}" readonly/>&nbsp;&nbsp;<span onclick="Dthumb({$moduleid},Dd('bannerw').value,Dd('bannerh').value, Dd('banner1').value, true, 'banner1', 'jpg');" class="jt">[Upload]</span>&nbsp;&nbsp;<span onclick="_preview(Dd('banner1').value);" class="jt">[Preview]</span>&nbsp;&nbsp;<span onclick="Dd('banner1').value='';" class="jt">[Delete]</span></td>
</tr>
<tr>
<td class="tl">Banner Image URL2</td>
<td class="tr"><input name="setting[banner2]" type="text" size="60" id="banner2" value="{$banner2}" readonly/>&nbsp;&nbsp;<span onclick="if(Dd('banner1').value==''){alert('Please upload a banner image addres1');return false;}Dthumb({$moduleid},Dd('bannerw').value,Dd('bannerh').value, Dd('banner2').value, true, 'banner2');" class="jt">[Upload]</span>&nbsp;&nbsp;<span onclick="_preview(Dd('banner2').value);" class="jt">[Preview]</span>&nbsp;&nbsp;<span onclick="Dd('banner2').value='';" class="jt">[Delete]</span></td>
</tr>
<tr>
<td class="tl">Banner Image URL3</td>
<td class="tr"><input name="setting[banner3]" type="text" size="60" id="banner3" value="{$banner3}" readonly/>&nbsp;&nbsp;<span onclick="if(Dd('banner2').value==''){alert('Please upload a banner image addres2');return false;}Dthumb({$moduleid},Dd('bannerw').value,Dd('bannerh').value, Dd('banner3').value, true, 'banner3');" class="jt">[Upload]</span>&nbsp;&nbsp;<span onclick="_preview(Dd('banner3').value);" class="jt">[Preview]</span>&nbsp;&nbsp;<span onclick="Dd('banner3').value='';" class="jt">[Delete]</span></td>
</tr>
<tr>
<td class="tl">Banner Image URL4</td>
<td class="tr"><input name="setting[banner4]" type="text" size="60" id="banner4" value="{$banner4}" readonly/>&nbsp;&nbsp;<span onclick="if(Dd('banner3').value==''){alert('Please upload a banner image addres3');return false;}Dthumb({$moduleid},Dd('bannerw').value,Dd('bannerh').value, Dd('banner4').value, true, 'banner4');" class="jt">[Upload]</span>&nbsp;&nbsp;<span onclick="_preview(Dd('banner4').value);" class="jt">[Preview]</span>&nbsp;&nbsp;<span onclick="Dd('banner4').value='';" class="jt">[Delete]</span></td>
</tr>
<tr>
<td class="tl">Banner Image URL5</td>
<td class="tr"><input name="setting[banner5]" type="text" size="60" id="banner5" value="{$banner5}" readonly/>&nbsp;&nbsp;<span onclick="if(Dd('banner4').value==''){alert('Please upload a banner image addres4');return false;}Dthumb({$moduleid},Dd('bannerw').value,Dd('bannerh').value, Dd('banner5').value, true, 'banner5');" class="jt">[Upload]</span>&nbsp;&nbsp;<span onclick="_preview(Dd('banner5').value);" class="jt">[Preview]</span>&nbsp;&nbsp;<span onclick="Dd('banner5').value='';" class="jt">[Delete]</span></td>
</tr>
</tbody>
<tr>
<td class="tl">Image of the video address</td>
<td class="tr"><input name="setting[video]" type="text" size="60" id="video" value="{$video}" onblur="UpdateURL();"/>&nbsp;&nbsp;<span onclick="Dfile({$moduleid}, Dd('video').value, 'video', 'mp4|flv|wma|wav');" class="jt">[Upload]</span>&nbsp;&nbsp;<span onclick="vs();" class="jt">[Preview]</span>&nbsp;&nbsp;<span onclick="Dd('video').value='';" class="jt">[Delete]</span>
<div id="v_player"></div>
{load('player.js')}
{load('url2video.js')}
<script type="text/javascript">
function vs() {
	UpdateURL();
	if(Dd('video').value.length > 5) {
		Ds('v_player');
		Inner('v_player', player(Dd('video').value,480,400,'',1)+'<br/><a href="javascript:" onclick="vh();" class="t">[关闭Preview]</a>');
	} else {
		vh();
	}
}
function vh() {Inner('v_player', '');Dh('v_player');}
function UpdateURL() {
	var str = url2video(Dd('video').value);
	if(str) Dd('video').value = str;
}
</script>
</td>
</tr>
<tr>
<td class="tl">Site Notice</td>
<td class="tr f_gray"><textarea name="setting[announce]" id="announce" style="width:500px;height:60px;">{$announce}</textarea><br/>Support for HTML syntax</td>
</tr>
<tr>
<td class="tl">Visits</td>
<td class="tr">
<input type="radio" name="setting[show_stats]" value="1" id="s_s_1"{if $show_stats==1} checked{/if}/><label for="s_s_1"> Show</label>&nbsp;&nbsp;&nbsp;&nbsp;
<input type="radio" name="setting[show_stats]" value="0" id="s_s_0"{if $show_stats==0} checked{/if}/><label for="s_s_0"> Do not show</label> 
</td>
</tr>
</table>
</div>

<div id="Tabs1" style="display:none;">
<table cellspacing="1" cellpadding="6" class="tb">
<tr style="display:{if $MG[home_menu]}{else}none{/if};">
<td class="tl">Menu settings<br/><br/><br/><a href="home.php?action=reset&item=menu" class="t" onclick="return confirm('You sure you want to restore the default？');">Restore Default</a></td>
<td class="tr">
<table cellpadding="3" cellspacing="3">
<tr align="center">
<td width="50">Show</td>
<td width="50">Sequence</td>
<td width="100">Name</td>
<td width="50">Pagination</td>
</tr>
{loop $HMENU $k $v}
{if strpos($menu_c, ','.$k.',') !== false}
<tr align="center">
<td>
<input type="checkbox" name="menu_show_tmp" value="{$k}"{if $menu_show[$k]} checked{/if} onclick="Dd('menu_show_{$k}').value=this.checked ? 1 : 0;"/><input type="hidden" name="setting[menu_show][{$k}]" value="{$menu_show[$k]}" id="menu_show_{$k}"/>
</td>
<td><input type="text" name="setting[menu_order][{$k}]" size="3" value="{$menu_order[$k]}"/></td>
<td><input type="text" name="setting[menu_name][{$k}]" size="20" value="{$menu_name[$k]}"/></td>
<td><input type="text" name="setting[menu_num][{$k}]" size="3" value="{$menu_num[$k]}"/>
<input type="hidden" name="setting[menu_file][{$k}]" value="{$menu_file[$k]}"/></td>
</tr>
{else}
<tr style="display:none;">
<td>
<input type="checkbox" name="menu_show_tmp" value="{$k}"/><input type="hidden" name="setting[menu_show][{$k}]" value="0" id="menu_show_{$k}"/>
</td>
<td><input type="text" name="setting[menu_order][{$k}]" size="3" value="{$menu_order[$k]}"/></td>
<td><input type="text" name="setting[menu_name][{$k}]" size="20" value="{$menu_name[$k]}"/></td>
<td><input type="text" name="setting[menu_num][{$k}]" size="3" value="{$menu_num[$k]}"/>
<input type="hidden" name="setting[menu_file][{$k}]" value="{$menu_file[$k]}"/></td>
</tr>
{/if}
{/loop}
</table>
</td>
</tr>
</table>
</div>

<div id="Tabs2" style="display:none;">
<table cellspacing="1" cellpadding="6" class="tb">
<tr>
<td class="tl">Sidebar Width</td>
<td class="tr"><input type="text" size="5" name="setting[side_width]" value="{$side_width}"/> px</td>
</tr>
<tr>
<td class="tl">Sidebar Position</td>
<td class="tr">
<table>
<tr align="center">
<td width="100"><img src="{DT_STATIC}{$MODULE[2][moduledir]}/image/side_l.gif" title="In the left sidebar" onclick="Dd('s_p_0').checked=true;"/></td>
<td width="100"><img src="{DT_STATIC}{$MODULE[2][moduledir]}/image/side_r.gif" title="In the right sidebar" onclick="Dd('s_p_1').checked=true;"/></td>
</tr>
<tr align="center">
<td><input type="radio" name="setting[side_pos]" value="0" id="s_p_0"{if $side_pos==0} checked{/if}/><label for="s_p_0">In the left sidebar</label></td>
<td><input type="radio" name="setting[side_pos]" value="1" id="s_p_1"{if $side_pos==1} checked{/if}/><label for="s_p_1">In the right sidebar</label></td>
</tr>
</table>
</td>
</tr>
<tr style="display:{if $MG[home_side]}{else}none{/if};">
<td class="tl">Let sidebar<br/><br/><br/><a href="home.php?action=reset&item=side" class="t" onclick="return confirm('You sure you want to restore the default？');">Restore Default</a></td>
<td class="tr">
<table cellpadding="3" cellspacing="3">
<tr align="center">
<td width="50">Show</td>
<td width="50">Sequence</td>
<td width="100">Name</td>
<td width="50">Quantity</td>
</tr>
{loop $HSIDE $k $v}
{if strpos($side_c, ','.$k.',') !== false}
<tr align="center">
<td>
<input type="checkbox" name="side_show_tmp" value="{$k}"{if $side_show[$k]} checked{/if} onclick="Dd('side_show_{$k}').value=this.checked ? 1 : 0;"/><input type="hidden" name="setting[side_show][{$k}]" value="{$side_show[$k]}" id="side_show_{$k}"/></td>
<td><input type="text" name="setting[side_order][{$k}]" size="3" value="{$side_order[$k]}"/></td>
<td><input type="text" name="setting[side_name][{$k}]" size="20" value="{$side_name[$k]}"/></td>
<td><input type="text" name="setting[side_num][{$k}]" size="3" value="{$side_num[$k]}"/>
<input type="hidden" name="setting[side_file][{$k}]" size="3" value="{$side_file[$k]}"/></td>
</tr>
{else}
<tr style="display:none;">
<td>
<input type="checkbox" name="side_show_tmp" value="{$k}"/><input type="hidden" name="setting[side_show][{$k}]" value="0" id="side_show_{$k}"/></td>
<td><input type="text" name="setting[side_order][{$k}]" size="3" value="{$side_order[$k]}"/></td>
<td><input type="text" name="setting[side_name][{$k}]" size="20" value="{$side_name[$k]}"/></td>
<td><input type="text" name="setting[side_num][{$k}]" size="3" value="{$side_num[$k]}"/>
<input type="hidden" name="setting[side_file][{$k}]" size="3" value="{$side_file[$k]}"/></td>
</tr>
{/if}
{/loop}
</table>
</td>
</tr>
</table>
</div>

<div id="Tabs3" style="display:none;">
<table cellspacing="1" cellpadding="6" class="tb"><tr style="display:{if $MG[home_main]}{else}none{/if};">
<td class="tl">Home Main Bar Settings<br/><br/><br/><a href="home.php?action=reset&item=main" class="t" onclick="return confirm('You sure you want to restore the default？');">Restore Default</a></td>
<td class="tr">
<table cellpadding="3" cellspacing="3">
<tr align="center">
<td width="50">Show</td>
<td width="50">Sequence</td>
<td width="100">Name</td>
<td width="50">Quantity</td>
</tr>
{loop $HMAIN $k $v}
{if strpos($main_c, ','.$k.',') !== false}
<tr align="center">
<td>
<input type="checkbox" name="main_show_tmp" value="{$k}"{if $main_show[$k]} checked{/if} onclick="Dd('main_show_{$k}').value=this.checked ? 1 : 0;"/><input type="hidden" name="setting[main_show][{$k}]" value="{$main_show[$k]}" id="main_show_{$k}"/></td>
<td><input type="text" name="setting[main_order][{$k}]" size="3" value="{$main_order[$k]}"/></td>
<td><input type="text" name="setting[main_name][{$k}]" size="20" value="{$main_name[$k]}"/></td>
<td><input type="text" name="setting[main_num][{$k}]" size="3" value="{$main_num[$k]}"/>
<input type="hidden" name="setting[main_file][{$k}]" size="3" value="{$main_file[$k]}"/></td>
</tr>
{else}
<tr style="display:none;">
<td>
<input type="checkbox" name="main_show_tmp" value="{$k}"/><input type="hidden" name="setting[main_show][{$k}]" value="0" id="main_show_{$k}"/></td>
<td><input type="text" name="setting[main_order][{$k}]" size="3" value="{$main_order[$k]}"/></td>
<td><input type="text" name="setting[main_name][{$k}]" size="20" value="{$main_name[$k]}"/></td>
<td><input type="text" name="setting[main_num][{$k}]" size="3" value="{$main_num[$k]}"/>
<input type="hidden" name="setting[main_file][{$k}]" size="3" value="{$main_file[$k]}"/></td>
</tr>
{/if}
{/loop}
</table>
</td>
</tr>
<tr>
<td class="tl">Company Overview</td>
<td class="tr"><input type="text" size="5" name="setting[intro_length]" value="{$intro_length}"/> Character</td>
</tr>
</table>
</div>

<div id="Tabs4" style="display:none;">
<table cellspacing="1" cellpadding="6" class="tb">
<tr>
<td class="tl">Home SEO title</td>
<td class="tr f_gray"><input type="text" size="60" name="setting[seo_title]" value="{$seo_title}"/>&nbsp; Leave blank to show the company name</td>
</tr>
<tr>
<td class="tl">Website Keywords</td>
<td class="tr"><input type="text" size="80" name="setting[seo_keywords]" value="{$seo_keywords}"/></td>
</tr>
<tr>
<td class="tl">Site Description</td>
<td class="tr"><input type="text" size="80" name="setting[seo_description]" value="{$seo_description}"/></td>
</tr>
{if $api_map && $MG[map]}
{php include DT_ROOT.'/api/map/'.$api_map.'/post.inc.php';}
{/if}
{if $api_stats && $MG[stats]}
{php include DT_ROOT.'/api/stats/'.$api_stats.'/post.inc.php';}
{/if}
{if $api_kf && $MG[kf]}
{php include DT_ROOT.'/api/kf/'.$api_kf.'/post.inc.php';}
{/if}
</table>
</div>
<table cellspacing="1" cellpadding="6" class="tb">
<tr>
<td class="tl">&nbsp;</td>
<td class="tr" height="30"><input type="submit" name="submit" value=" Save " class="btn"/>&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" name="submit" value=" Restore Default " class="btn" onclick="if(confirm('OK To restore the default settings? All settings will be emptied shops')){this.form.action='home.php?reset=1';}else{return false;}"/></td>
</tr>
</table>
</form>
{load('clear.js')}
<script type="text/javascript">
s('homepage');
{if $tab}
Tab({$tab});
{else}
m('Tab0');
{/if}
</script>
{template 'footer', 'member'}